<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>

<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>My JSP 'friend_add.jsp' starting page</title>
	
	<link href="../css/friend_dialogbox.css" rel="stylesheet" type="text/css" />
	
	<script language="javascript">
		function check_input()
		{
		var friendname= document.login.Friendname.value;
   		 if(friendname=="")
   		 {
		 alert("请输入好友名称！");
   		 return (false);
   		 }
		}
		</script>
  </head>
  <body>
  <%
    if(session.getAttribute("Namesel")==null)
    	response.sendRedirect("index.jsp");
    	else{%>
  	
<form method="post" name="login" action="friend_add_result.jsp" onSubmit="return check_input()">
<input align="left" name="Friendname" value="好友名" size="10" maxlength="10">
<br>
<textarea name="con_Request" rows=5 cols=15>我对好友说。。</textarea>
<br>
<input type="submit" name="Submit" value="提交">
<input type="reset" name="Submit2" value="清除">
</form>
<a href="selhome_main.jsp">返回我的主页</a>
<% 
}
%>
  </body>
</html>
